<div class="row mt-3 mb-3">
  <div class="col">
    <div class="d-flex justify-content-between" *ngIf="enableCsvExport">
      <button class="btn btn-primary btn-sm" (click)="exportToCsv()">
        <i class="fas fa-file-csv"></i>
        Export to CSV
      </button>
      <button class="btn btn-primary btn-sm" (click)="exportSelectedToCsv()" [disabled]="!rowsSelected">
        <i class="fas fa-file-csv"></i>
        Export Selected to CSV
      </button>
    </div>
  </div>
</div>
<ag-grid-angular style="width: 100%; height: 600px;" class="ag-theme-balham" [rowData]="rows" [columnDefs]="gridColumns"
  [pagination]="true" [frameworkComponents]="frameworkComponents" [defaultColDef]="defaultColumnDef" [rowHeight]="34"
  [rowSelection]="enableCsvExport ? 'multiple' : null" [paginationPageSize]="20" (gridReady)="onGridReady($event)">
</ag-grid-angular>